package com.awonsome.mall.ums.boot.controller;

import com.awonsome.common.core.result.Result;
import com.awonsome.mall.ums.pojo.dto.RechargeDTO;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统管理 - 会员充值
 *
 * @author yangdejun
 * @date 2022/1/30 10:35
 */
@RestController
@RequestMapping(value = "/api/v1/recharge-orders")
public class RechargeController {

    private String createOrderURL;

    private String findOrderURL;

    private String appKey;

    private String appSecret;

    @PostMapping(value = "/")
    public Result recharge(@RequestBody RechargeDTO rechargeDTO) {
        HttpHeaders headers = new HttpHeaders();
        headers.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
        headers.set("Payment-Key", appKey);
        headers.set("Payment-Secret", appSecret);

        return Result.success();
    }
}
